import React, { useCallback, useState, useEffect } from 'react';
import { IRouteComponentProps, history } from 'umi';

export default function Layout({ children }: IRouteComponentProps) {
  const hackCodeStyle =
    window.location.pathname.indexOf('preview') < 0
      ? { height: '100%' }
      : { height: '100%', overflow: 'auto' };
  return <div style={hackCodeStyle}>{children}</div>;
}
